
//封装暴露函数, 作用: 返回 action 对象
import {COMMENT_ADD, COMMENT_MINUS} from '../constants';

export function jiaAction(data){
    return {
        type: COMMENT_ADD,
        data: data
    }
}

export function jianAction(data){
    return {
        type: COMMENT_MINUS,
        data: data
    }
}

export function asyncJiaAction(data){
    return dispatch => {
        setTimeout(() => {
            dispatch(jiaAction(data));
        }, 1000)
    }
}


// store.dispatch({type: 'jia', data: 1});
// store.dispatch(jiaAction(1));